package com.dq.text;

import java.io.UnsupportedEncodingException;
import java.util.Arrays;

public class demo2 {

	public static void main(String[] args) {
		
		String ss = "xxxx.xls";
		System.out.println(ss.substring(0, ss.indexOf(".")));
		
		String sss="ssss*";
		System.out.println(sss.replace("*",""));
		
		String str="ss";
		try {
			byte[] len = str.getBytes("gbk");
			System.out.println(len.length);
		} catch (UnsupportedEncodingException e) {
			e.printStackTrace();
		}
		
		String aa[]={"11","22","33","44","55"};
		System.out.println(aa.length);
		aa=Arrays.copyOfRange(aa, 0,aa.length-1);
		for (int i = 0; i < aa.length; i++) {
			System.out.print(aa[i]+" ");
		}
		System.out.println("-----");
		System.out.println();
		
	}
}
